Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

chore: Add api path docs and test #767

Merged
merged 1 commit into from
May 18, 2018
Merged

Conversation

vasco-santos
Copy link
Contributor

@vasco-santos vasco-santos commented May 16, 2018

After @alanshaw suggestion, I added docs and a test for the api-path usage in the API constructor.

Closes #581

@vasco-santos vasco-santos requested a review from alanshaw May 16, 2018 10:02
@ghost ghost assigned vasco-santos May 16, 2018
@ghost ghost added the in progress label May 16, 2018
clientWorks(ipfsAPI({
host: splitted[2],
port: splitted[4],
'api-path': '/api/v0/'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is the default, this test doesn't really prove anything except for you can pass api-path as an option without it breaking.

Ideally we'd actually setup a proxy for the test and point the API at the proxy with api-path: '/ipfs/api/v0'. Obviously this wouldn't be possible in the browser so you'd need to skip.

I'd accept a PR for that!

@alanshaw alanshaw merged commit 2abe1eb into master May 18, 2018
@alanshaw alanshaw deleted the chore_add-api-path-docs-and-test branch May 18, 2018 09:41
@ghost ghost removed the in progress label May 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants